/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * frmKhuyenMai.java
 *
 * Created on Aug 29, 2012, 12:30:12 AM
 */
package gui;

import dao.KhuyenMaiDAO;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.TimeZone;
import java.util.Vector;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;
import pojo.Khuyenmai;

/**
 *
 * @author Admin
 */
public class frmKhuyenMai extends javax.swing.JFrame {

    /** Creates new form frmKhuyenMai */
    private List<Khuyenmai> _lKhuyenMai;
    private int _index;
    private frmQuanLyKhuyenMai _frmKM;

    public frmKhuyenMai() {
        initComponents();
        
        this._index = 0;

        Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
        this.jdtNgayBD.setCalendar(calendar);
        this.jdtNgayKT.setCalendar(calendar);

        this._lKhuyenMai = KhuyenMaiDAO.layDanhSachKhuyenMai();
        fillJTable();
    }
    
    public frmKhuyenMai(frmQuanLyKhuyenMai frm) {
        initComponents();
        this._frmKM = frm;
        
        this._index = 0;

        Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
        this.jdtNgayBD.setCalendar(calendar);
        this.jdtNgayKT.setCalendar(calendar);

        this._lKhuyenMai = KhuyenMaiDAO.layDanhSachKhuyenMai();
        fillJTable();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jdtNgayBD = new com.toedter.calendar.JDateChooser();
        jLabel4 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jdtNgayKT = new com.toedter.calendar.JDateChooser();
        jLabel7 = new javax.swing.JLabel();
        jtfTyLe = new javax.swing.JTextField();
        jtfTenKhuyenMai = new javax.swing.JTextField();
        jbtnSua = new javax.swing.JButton();
        jbtnThem = new javax.swing.JButton();
        jbtnXoa = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();
        jtfNoiDung = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        jtbKhuyenMai = new javax.swing.JTable();
        jbtnDong = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel1.setText("CHƯƠNG TRÌNH KHUYẾN MÃI");

        jLabel4.setText("Ngày Bắt Đầu");

        jLabel2.setText("Tên Khuyến Mãi");

        jLabel5.setText("Ngày Kết Thúc");

        jLabel6.setText("Tỷ Lệ Giảm Giá");

        jLabel7.setText("%");

        jbtnSua.setText("Sửa");
        jbtnSua.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtnSuaActionPerformed(evt);
            }
        });

        jbtnThem.setText("Thêm");
        jbtnThem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtnThemActionPerformed(evt);
            }
        });

        jbtnXoa.setText("Xóa");
        jbtnXoa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtnXoaActionPerformed(evt);
            }
        });

        jLabel3.setText("Nội Dung");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jtfTenKhuyenMai))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel6)
                                .addGap(18, 18, 18)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jtfNoiDung)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addComponent(jtfTyLe, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(jLabel7)))))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 125, Short.MAX_VALUE)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addComponent(jLabel4))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jdtNgayKT, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jdtNgayBD, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 328, Short.MAX_VALUE)
                        .addComponent(jbtnThem, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbtnSua, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(6, 6, 6)
                        .addComponent(jbtnXoa, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jdtNgayBD, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel4))
                            .addGap(18, 18, 18)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jLabel5)
                                .addComponent(jdtNgayKT, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGroup(jPanel1Layout.createSequentialGroup()
                            .addComponent(jtfTenKhuyenMai, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(18, 18, 18)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel6)
                                .addComponent(jtfTyLe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jLabel7)))))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jbtnXoa)
                        .addComponent(jbtnSua)
                        .addComponent(jbtnThem)
                        .addComponent(jLabel3))
                    .addComponent(jtfNoiDung, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jtbKhuyenMai.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jtbKhuyenMai.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jtbKhuyenMaiMouseClicked(evt);
            }
        });
        jtbKhuyenMai.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                jtbKhuyenMaiKeyPressed(evt);
            }
        });
        jScrollPane1.setViewportView(jtbKhuyenMai);

        jbtnDong.setText("Đóng");
        jbtnDong.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtnDongActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 638, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jbtnDong, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(46, 46, 46))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addGap(236, 236, 236))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(jLabel1)
                .addGap(18, 18, 18)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jbtnDong)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void jbtnThemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnThemActionPerformed
// TODO add your handling code here:
    Khuyenmai khuyenmai = new Khuyenmai();
    khuyenmai.setTenkhuyenmai(this.jtfTenKhuyenMai.getText());
    khuyenmai.setNoidung(this.jtfNoiDung.getText());
    khuyenmai.setNgaybdkm(this.jdtNgayBD.getDate());
    khuyenmai.setNgayktkm(this.jdtNgayKT.getDate());
    float tile = Float.valueOf(this.jtfTyLe.getText());
    khuyenmai.setTylegiamgia(Double.valueOf(tile / 10));

    boolean kq = KhuyenMaiDAO.themKhuyenMai(khuyenmai);
    if (kq) {
        JOptionPane.showMessageDialog(this, "Thêm thành công !", "Thông báo", JOptionPane.INFORMATION_MESSAGE);
    } else {
        JOptionPane.showMessageDialog(this, "Thêm không được !", "Thông báo", JOptionPane.WARNING_MESSAGE);
    }
    this._lKhuyenMai = KhuyenMaiDAO.layDanhSachKhuyenMai();
    fillJTable();
    
    this._frmKM.fillJCbxKhuyenMai();
}//GEN-LAST:event_jbtnThemActionPerformed

private void jbtnSuaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnSuaActionPerformed
// TODO add your handling code here:
    Khuyenmai khuyenmai = new Khuyenmai();
    khuyenmai.setMakhuyenmai(this._lKhuyenMai.get(this._index).getMakhuyenmai());
    khuyenmai.setTenkhuyenmai(this.jtfTenKhuyenMai.getText());
    khuyenmai.setTylegiamgia(Double.valueOf(this.jtfTyLe.getText()));
    khuyenmai.setNoidung(this.jtfNoiDung.getText());
    khuyenmai.setNgaybdkm(this.jdtNgayBD.getDate());
    khuyenmai.setNgayktkm(this.jdtNgayKT.getDate());
    
    boolean kq = KhuyenMaiDAO.capnhatThongTinKhuyenMai(khuyenmai);
    if (kq) {
        JOptionPane.showMessageDialog(this, "Cập nhật thành công !", "Thông báo", JOptionPane.INFORMATION_MESSAGE);
    } else {
        JOptionPane.showMessageDialog(this, "Cập nhật không được !", "Thông báo", JOptionPane.WARNING_MESSAGE);
    }

    this._lKhuyenMai = KhuyenMaiDAO.layDanhSachKhuyenMai();
    fillJTable();
}//GEN-LAST:event_jbtnSuaActionPerformed

private void jbtnXoaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnXoaActionPerformed
// TODO add your handling code here:
    Khuyenmai khuyenmai = new Khuyenmai();
    khuyenmai.setMakhuyenmai(this._lKhuyenMai.get(this._index).getMakhuyenmai());
    
    boolean kq = KhuyenMaiDAO.xoaKhuyenMai(khuyenmai);
    if (kq) {
        JOptionPane.showMessageDialog(this, "Xóa thành công !", "Thông báo", JOptionPane.INFORMATION_MESSAGE);
    } else {
        JOptionPane.showMessageDialog(this, "Xóa nhật không được !", "Thông báo", JOptionPane.WARNING_MESSAGE);
    }
    
    this._lKhuyenMai = KhuyenMaiDAO.layDanhSachKhuyenMai();
    fillJTable();
}//GEN-LAST:event_jbtnXoaActionPerformed

private void jbtnDongActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtnDongActionPerformed
// TODO add your handling code here:
 //    System.exit(1);
    this.setVisible(false);
}//GEN-LAST:event_jbtnDongActionPerformed

private void jtbKhuyenMaiMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtbKhuyenMaiMouseClicked
// TODO add your handling code here:
    this._index = this.jtbKhuyenMai.getSelectedRow();
    this.jtfTenKhuyenMai.setText(this.jtbKhuyenMai.getModel().getValueAt(this._index, 0).toString());
    float tile = Float.valueOf(this.jtbKhuyenMai.getModel().getValueAt(this._index, 1).toString());
    this.jtfTyLe.setText(String.valueOf((int) tile));
    this.jtfNoiDung.setText(this.jtbKhuyenMai.getModel().getValueAt(this._index, 4).toString());

    //lay danh muc cua hang vua dc chon trong table vao jCalendar
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
    try {
        Date date = format.parse(this.jtbKhuyenMai.getModel().getValueAt(this._index, 2).toString());
        this.jdtNgayBD.setDate(date);
        Date date2 = format.parse(this.jtbKhuyenMai.getModel().getValueAt(this._index, 3).toString());
        this.jdtNgayKT.setDate(date2);
    } catch (ParseException ex) {
        // bad date
    }
}//GEN-LAST:event_jtbKhuyenMaiMouseClicked

private void jtbKhuyenMaiKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jtbKhuyenMaiKeyPressed
// TODO add your handling code here:
    this._index = this.jtbKhuyenMai.getSelectedRow();
    int key = evt.getKeyCode();
    if (key == 40) {//nhan nut xuong
        this._index++;
    }
    if (key == 38) {//nhan nutlen
        this._index--;
    }

    this.jtfTenKhuyenMai.setText(this.jtbKhuyenMai.getModel().getValueAt(this._index, 0).toString());
    float tile = Float.valueOf(this.jtbKhuyenMai.getModel().getValueAt(this._index, 1).toString());
    this.jtfTyLe.setText(String.valueOf((int) tile));
    this.jtfNoiDung.setText(this.jtbKhuyenMai.getModel().getValueAt(this._index, 4).toString());

    //lay danh muc cua hang vua dc chon trong table vao jCalendar
    SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
    try {
        Date date = format.parse(this.jtbKhuyenMai.getModel().getValueAt(this._index, 2).toString());
        this.jdtNgayBD.setDate(date);
        Date date2 = format.parse(this.jtbKhuyenMai.getModel().getValueAt(this._index, 3).toString());
        this.jdtNgayKT.setDate(date2);
    } catch (ParseException ex) {
        // bad date
    }
}//GEN-LAST:event_jtbKhuyenMaiKeyPressed

    private void fillJTable() {
        DefaultTableModel tableModel = new DefaultTableModel();
        tableModel.addColumn("Tên Khuyến Mãi");
        tableModel.addColumn("Tỷ Lệ Giảm Giá (%)");
        tableModel.addColumn("Ngày Bắt Đầu");
        tableModel.addColumn("Ngày Kết Thúc");
        tableModel.addColumn("Nội Dung");
        this.jtbKhuyenMai.setModel(tableModel);

        for (int i = 0; i < this._lKhuyenMai.size(); i++) {
            Vector vt = new Vector();
            vt.add(this._lKhuyenMai.get(i).getTenkhuyenmai());
            double tile = this._lKhuyenMai.get(i).getTylegiamgia() * 10;
            vt.add((int) tile);
            vt.add(this._lKhuyenMai.get(i).getNgaybdkm());
            vt.add(this._lKhuyenMai.get(i).getNgayktkm());
            vt.add(this._lKhuyenMai.get(i).getNoidung());

            tableModel.addRow(vt);
        }
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(frmKhuyenMai.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(frmKhuyenMai.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(frmKhuyenMai.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(frmKhuyenMai.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new frmKhuyenMai().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JButton jbtnDong;
    private javax.swing.JButton jbtnSua;
    private javax.swing.JButton jbtnThem;
    private javax.swing.JButton jbtnXoa;
    private com.toedter.calendar.JDateChooser jdtNgayBD;
    private com.toedter.calendar.JDateChooser jdtNgayKT;
    private javax.swing.JTable jtbKhuyenMai;
    private javax.swing.JTextField jtfNoiDung;
    private javax.swing.JTextField jtfTenKhuyenMai;
    private javax.swing.JTextField jtfTyLe;
    // End of variables declaration//GEN-END:variables
}
